Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add form in Student View for editing enrollment information #1346

Merged
merged 2 commits into from
Jan 17, 2019

Conversation

pbitutsky
Copy link
Contributor

This resolves issue #1274.

I've added a form to the student view that allows admin/staff to edit information about students like their name, SID, secondary auth, section, and role. Users cannot, however, change students' email addresses since much of the back-end code relies on using the email as an identifier. Maybe this could be a feature in the future.

screen shot 2019-01-16 at 12 30 51 am

screen shot 2019-01-16 at 12 30 55 am

screen shot 2019-01-16 at 12 31 37 am

screen shot 2019-01-16 at 12 31 45 am

@colinschoen
Copy link
Member

colinschoen commented Jan 16, 2019 via email

Copy link
Member

@colinschoen colinschoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nits

else:
email, role = form.email.data, form.role.data
Enrollment.enroll_from_form(cid, form)
flash("Edited User Successfully", 'success')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, prefer single quotes unless a single quote is used in the string. (I know this isn't consistent everywhere).

flash("Edited User Successfully", 'success')
else:
if form.is_submitted():
flash("There is an issue with your request.", 'error')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@colinschoen
Copy link
Member

This might also be a nice opportunity for a test, but I won't hold you to it if you want to get it shipped now :).

Copy link
Member

@colinschoen colinschoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@colinschoen colinschoen merged commit 531a698 into master Jan 17, 2019
@colinschoen colinschoen deleted the edit-enrollment-information branch January 17, 2019 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants